PEGetVersion

Use PEGetVersion to retrieve the version number of the DLL or the Crystal Report Engine. The high-order byte is the major version number and the low-order byte is the minor version number. This function can be used whenever you build functionality into a report that may not be available in earlier versions of the Crystal Report Engine and you need to verify the version number first. The function can be a handy safeguard for users who have more than one version of the Crystal Report Engine with the older version earlier in the path than the new version.

C Syntax
short CRPE_API PEGetVersion (
        short versionRequested );
Parameter

versionRequested

Specifies whether the DLL or Crystal Report Engine version is being requested. Use one of the following PE_GV_XXX constants.


Constant Description


PE_GV_DLL

Returns the version of the DLL (CRPE/CRPE32).


PE_GV_ENGINE

Returns the version of the Crystal Report Engine.

Returns

Returns the version number of the DLL or the Crystal Report Engine.

VB Syntax
Declare Function PEGetVersion Lib "crpe32.dll" (ByVal version As 
Integer)
    As Integer

The following simplifies the PEGetVersion call in Visual Basic.

Function PEVBGetVersion (ByVal component As Integer) As Single
Dim version As Integer
Dim major As Integer
Dim minor As Integer
version = PEGetVersion(component)
If version = 0 Then
PEVBGetVersion = 0
Else
major = version / 256
minor = version Mod 256
PEVBGetVersion = major + (minor / 10)
End If
End Function
Delphi Syntax
function PEGetVersion (
    versionRequested: integer
    ): Smallint stdcall;
dBASE for Windows Syntax

EXTERN CWORD PEGetVersion (CWORD) CRPE.DLL



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com